/*
 * Criado em Mar 21, 2005
 *
 *
 */
package vendas.dto;

import gminet.infra.dao.SimpleTransferObject;

import java.util.List;

/**
 * @author Gabriel Flores Mendes
 * 
 * 
 */
public class UserType extends SimpleTransferObject {

    private static final long serialVersionUID = 6990877982360668966L;
    
    private static final byte USER_ID = 10;
    private static final byte ADMINISTRATOR_ID = 20;
    private static final byte MASTER_ID = 99;

    public static final UserType USER = new UserType(USER_ID, "Usuario");
    public static final UserType ADMINISTRATOR = new UserType(ADMINISTRATOR_ID, "Administrador");
    public static final UserType MASTER = new UserType(MASTER_ID, "Master");

    static {
        addObject(UserType.class, USER);
        addObject(UserType.class, ADMINISTRATOR);
        addObject(UserType.class, MASTER);
    }

    private UserType(int i, String str) {

        super(i, str);
    }

    @SuppressWarnings("unchecked")
    public static List<UserType> getList() {

        return (List<UserType>) getList(UserType.class);
    }

    public static UserType getUserTypeById(int id) {

        return (UserType) getObject(UserType.class, id);
    }

}
